#ifndef H264_ONE_FRAME_GET
#define H264_ONE_FRAME_GET

#if __cplusplus
extern "C" {
#endif

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define MAX_INPUT_STR_SIZE 64

typedef unsigned int uint32;

typedef struct {
    char  fileName[MAX_INPUT_STR_SIZE];
    long fd;
    unsigned char *buffer;
    long bufSize;
    long bufLen;
    long readLen;
    long curFrameIdx;
    long curFrameAddr;
    long nextFrameAddr;
    int  findFirstFrame;
    unsigned long num;
    unsigned long find_flag;
    
} H264FileSource;

extern int h264_one_frame_get_init(H264FileSource *file_sourece, long buffer_length);
extern int h264_one_frame_get_process(H264FileSource *file_sourece, char *src_buffer,int src_len ,char * dst_buffer, int *buffer_length);
extern int h264_one_frame_get_deinit(H264FileSource *file_sourece);

#if __cplusplus
}
#endif

#endif

